package com.entity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

/**
 * 【财务管理】 资金流水
 */

@Entity
@Table(name = "capital_flow")
@Getter @Setter
public class FinanceFlow extends BaseEntity {

    @Column
    private Integer financeAccountId;

    @Column
    private String companyName;

    @Column
    @Temporal(TemporalType.DATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date flowDate;

    // 收入金额
    @Column(name = "in_amount", precision = 15, scale = 2)
    private BigDecimal inAmount =  BigDecimal.ZERO;

    // 支出金额
    @Column(name = "out_amount", precision = 15, scale = 2)
    private BigDecimal outAmount =  BigDecimal.ZERO;

    @Column(name = "remark", length = 500)
    private String remark;

}

